找传奇、传世资源到传世资源站!

c# 三层架构示例源码下载

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

c# 三层架构示例源码下载 C#语言基础-第1张using System;using System.Collections.Generic;using System.ComponentModel;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Login.View{ public partial class MainFrm : Form { private int childFormNumber = 0; public MainFrm() { InitializeComponent(); } private void ShowNewForm(object sender, EventArgs e) { // 创建此子窗体的一个新实例。 Form childForm = new Form(); // 在显示该窗体前使其成为此 MDI 窗体的子窗体。 childForm.MdiParent = this; childForm.Text = "窗口" childFormNumber ; childForm.Show(); } private void OpenFile(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); openFileDialog.Filter = "文本文件(*.txt)|*.txt|所有文件(*.*)|*.*"; if (openFileDialog.ShowDialog(this) == DialogResult.OK) { string FileName = openFileDialog.FileName; // TODO: 在此处添加打开文件的代码。 } } private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); saveFileDialog.Filter = "文本文件(*.txt)|*.txt|所有文件(*.*)|*.*"; if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { string FileName = saveFileDialog.FileName; // TODO: 在此处添加代码,将窗体的当前内容保存到一个文件中。 } } private void ExitToolsStripMenuItem_Click(object sender, EventArgs e) { Application.Exit(); } private void CutToolStripMenuItem_Click(object sender, EventArgs e) { // TODO: 使用 System.Windows.Forms.Clipboard 将所选的文本或图像插入到剪贴板 } private void CopyToolStripMenuItem_Click(object sender, EventArgs e) { // TODO: 使用 System.Windows.Forms.Clipboard 将所选的文本或图像插入到剪贴板 } private void PasteToolStripMenuItem_Click(object sender, EventArgs e) { // TODO: 使用 System.Windows.Forms.Clipboard.GetText() 或 System.Windows.Forms.GetData 从剪贴板中检索信息。 } private void StatusBarToolStripMenuItem_Click(object sender, EventArgs e) { statusStrip.Visible = statusBarToolStripMenuItem.Checked; } private void CascadeToolStripMenuItem_Click(object sender, EventArgs e) { LayoutMdi(MdiLayout.Cascade); } private void TileVerticleToolStripMenuItem_Click(object sender, EventArgs e) { LayoutMdi(MdiLayout.TileVertical); } private void TileHorizontalToolStripMenuItem_Click(object sender, EventArgs e) { LayoutMdi(MdiLayout.TileHorizontal); } private void ArrangeIconsToolStripMenuItem_Click(object sender, EventArgs e) { LayoutMdi(MdiLayout.ArrangeIcons); } private void CloseAllToolStripMenuItem_Click(object sender, EventArgs e) { foreach (Form childForm in MdiChildren) { childForm.Close(); } } private void MainFrm_Load(object sender, EventArgs e) { Loginfrm lf = new Loginfrm(); lf.Show(); lf.MdiParent = this; this.menuStrip.Enabled = false; } private void optionsToolStripMenuItem_Click(object sender, EventArgs e) { } }}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复